Disk storage apparatus and data storage method

ABSTRACT

According to one embodiment, a disk storage apparatus includes a disk, a detector, and a controller. The disk includes a first recording area for recording with a first track density, and a second recording area for recording with a second track density lower than the first track density. The detector is configured to detect a variation of an outside environment. The controller is configured to select a nonvolatile memory or the second recording area as a storage destination of write data transferred from a host, based on a content of the variation of the outside environment detected by the detector, and a state of capability or incapability of storage of the nonvolatile memory.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority fromJapanese Patent Application No. 2013-056854, filed Mar. 19, 2013, theentire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a disk storageapparatus and a data storage method.

BACKGROUND

In recent years, in the field of disk drives represented by a hard diskdrive (HDD), a large-capacity hybrid disk drive has been developed,which uses a flash memory (usually, a NAND-type flash memory) which is anonvolatile memory, in addition to a disk, as data storage media.

Furthermore, there has been developed a disk drive to which a method ofusing a disk including a shingled write recording area, which is an areawith a high track density (TPI), and a media cache area, which is arecording area with a relatively low track density (TPI), is applied.Hereinafter, the shingled write recording area is referred to as “SMR(shingled write magnetic recording) area”.

Specifically, in the disk drive, write data from a host is stored in anyone of data recording areas, namely an SMR area on the disk, a mediacache area on the disk, and a flash memory.

The three data recording areas have different degrees of influence dueto a variation of an outside environment, which represents anenvironment of the outside of the apparatus, such as vibration (impact),temperature, or atmospheric pressure. Accordingly, control is requiredto properly store write data, based on the variation of the outsideenvironment.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the structure of a disk driverelating to a first embodiment;

FIG. 2 is a flowchart illustrating a basic data storage operationrelating to the first embodiment;

FIG. 3 is a flowchart illustrating a data storage operation relating tothe first embodiment;

FIG. 4 is a flowchart illustrating a data storage operation relating toa second embodiment; and

FIG. 5 is a flowchart illustrating a data storage operation relating toa third embodiment.

DETAILED DESCRIPTION

In general, according to one embodiment, a disk storage apparatusincludes a disk, a nonvolatile memory, a detector, and a controller. Thedisk includes a first recording area for recording with a first trackdensity, and a second recording area for recording with a second trackdensity lower than the first track density. The detector is configuredto detect a variation of an outside environment. The controller isconfigured to select the nonvolatile memory or the second recording areaas a storage destination of write data transferred from a host, based ona content of the variation of the outside environment detected by thedetector, and a state of capability or incapability of storage of thenonvolatile memory.

Various embodiments will be described hereinafter with reference to theaccompanying drawings.

FIG. 1 is a block diagram illustrating a main part of a disk driverelating to an embodiment.

As shown in FIG. 1, the disk drive of the embodiment is a hybrid diskdrive including, as storage media, a disk 1 and a flash memory 17 (NANDflash memory) 17. The disk drive includes, in general terms, a head-diskassembly (HDA), a head amplifier integrated circuit (hereinafterreferred to as “head amplifier IC”), and a system controller 15 which isa one-chip integrated circuit.

The HDA includes, in addition to the disk 1, a spindle motor (SPM) 2, anarm 3 on which a head 10 is mounted, and a voice coil motor (VCM) 4. Thedisk 1 is rotated by the spindle motor 2. The arm 3 and VCM 4 constitutean actuator. The actuator is driven by the VCM 4 to control and move thehead 10, which is mounted on the arm 3, to a designated position on thedisk 1.

The head 10 has a slider as a main body, and includes a write head 10Wand a read head 10R which are mounted on the slider. The read head 10Rreads out data which is recorded on data tracks on the disk 1. The writehead 10R writes data on the disk 1.

The head amplifier IC 11 includes a read amplifier and a write driver.The read amplifier amplifies a read signal which has been read by theread head 10R, and sends the amplified read signal to a read/write (R/W)channel 12. On the other hand, the write driver transmits a writecurrent, which corresponds to write data that is output from the R/Wchannel 12, to the write head 10W.

The system controller 15 includes the R/W channel 12, a hard diskcontroller (HDC) 13 and a microprocessor (MPU) 14. The R/W channel 12includes a read channel 12R which executes a signal process of readdata, and a write channel 12W which executes a signal process of writedata.

The HDC 13 controls data transfer between a host 19 and the R/W channel12. The HDC 13 controls a buffer memory (DRAM) 16 and temporarily storesread data and write data in the buffer memory 16, thereby executing datatransfer control. However, as will be described later, the HDC 13normally stores write data, which is received from the host 19, in theflash memory 17, without intervention of the buffer 16. When write datacannot be stored in the flash memory 17, the HDC 13 temporarily storesthe write data in the buffer memory 16.

The MPU 14 is a main controller, which controls the VCM 4 via the driverIC 18 and executes servo control to position the head 10. Further, theMPU 14 controls a write operation of data on the disk 1, and executescontrol to select a storage destination of write data which istransferred from the host 19, as will be described later.

The write operation by the control of the MPU 14 includes an SMR(shingled write magnetic recording) operation. A main data recordingarea on the disk 1 is an SMR area 110 in which data is written by theSMR operation. In addition, a data recording area, which is secured on,for example, an outer peripheral side on the disk 1, is a media cachearea 100. The media cache area 100, compared to the SMR area 110 with ahigh track density, is a data recording area with a low track density,in which data is written by a normal write operation. The media cachearea 100, together with the flash memory 17, is used as a temporary datarecording area.

Besides, the disk drive of the embodiment includes various sensors fordetecting a variation of an outside environment (an environment of theoutside of the disk drive), such as temperature, vibration (impact),atmospheric pressure, humidity, etc. The variation of the outsideenvironment is also called “disturbance” or “outside interference”.Specifically, the sensors include a temperature sensor 20 which detectsa variation in temperature, a shock sensor 21 which detects vibration(impact), an atmospheric pressure sensor 22 which detects a variation inatmospheric pressure, and a humidity sensor 23 which detects humidity.

[Data Storage Operation]

Referring to flowcharts of FIG. 2 and FIG. 3, a data storage operationof the embodiment is described.

To begin with, as shown in FIG. 2, in the disk drive, the HDC 13receives a command (a write command in this example) which istransferred from the host 19 via an interface (block 200). The HDC 13stores write data (hereinafter referred to simply as “data”), which istransferred following the command, in the flash memory 17 or buffermemory (DRAM) 16.

In the present embodiment, upon receiving the command, the MPU 14determines the presence/absence of a variation (vibration or impact) ofthe outside environment of the disk drive, based on detection of theshock sensor 21 in this example (block 201). When a variation of theoutside environment has occurred, control goes to a data storageoperation illustrated in the flowchart of FIG. 3 (YES in block 201).

Next, a case in which there is no variation of the outside environmentis described (NO in block 201). The HDC 13 checks a free space of theflash memory 17 (block 202). Basically, when the flash memory 17 has afree space, the HDC 13 stores data from the host 19 in the flash memory17 (YES in block 203, block 204). Based on the operation state of thedisk drive, the MPU 14 executes a flush process of transferring the datafrom the flash memory 17 to the SMR area 110 on the disk 1 (block 205).

On the other hand, when the free space of the flash memory 17 isinsufficient, the HDC 13 temporarily stores the data in the buffermemory (DRAM) 16. The MPU 14 stores the data in the media cache area 100via the buffer memory (DRAM) 16 (NO in block 203, block 206). Further,based on the operation state of the disk drive, the MPU 14 executes aflush process of transferring the data from the media cache area 100 tothe SMR area 110 (block 205).

In the meantime, aside from the case in which the free space of theflash memory 17 is insufficient, when the HDC 13 is unable to access theflash memory 17 because of an internal process being executed, the HDC13 temporarily stores data in the buffer memory (DRAM) 16.Alternatively, the HDC 13 directly writes data in the memory cache area100, without intervention of the buffer memory (DRAM) 16.

Also in the case in which the life of the flash memory 17 reaches thelimit, data is temporarily stored in the buffer memory (DRAM) 16, ordata is directly written in the media cache area 100 withoutintervention of the buffer memory (DRAM) 16. Specifically, for example,this corresponds to a case in which the number of times of repetitiveuse of a certain location in the flash memory has been reached, and acase in which the error ratio of the same location has increased.Usually, as the condition under which the flash memory 17 cannot beused, there are plural factors, such as when the number of times ofwrite has exceeded a threshold, and when the number of defects occurringsubsequently has exceeded a threshold.

In this example, the cases in which data cannot be stored in the flashmemory 17 are generally represented by the case in which the free spaceof the flash memory 17 is insufficient. Specifically, the check of thefree space of the flash memory 17 is the check ofcapability/incapability of storage of the flash memory 17.

Next, referring to a flowchart of FIG. 3, a description is given of thecase in which vibration (impact) has been applied to the disk drive as avariation of the outside environment.

The MPU 14 detects vibration (impact) in accordance with an output fromthe shock sensor 21 (block 300). Specifically, as shown in FIG. 2, thiscase corresponds to the case in which a variation has occurred in theoutside environment of the disk drive (YES in block 201). The MPU 14determines whether the vibration (impact) has exceeded a stipulatedvalue (block 301). When the vibration (impact) is not greater than thestipulated value (within a permissible range), the MPU 14 executes anoperation of storing data in the flash memory 17 (NO in block 301). Inthis case, although the access to the DRAM 16 and flash memory 17 isexecuted via the HDC 13, it is assumed, for the purpose of convenience,that the MPU 14 accesses the DRAM 16 and flash memory 17.

Specifically, when the flash memory 17 has a free space which can storedata, the MPU 14 stores the data in the flash memory 17 (YES in block307, block 308). In this case, since there is vibration (impact) evenwithin the permissible range, the MPU 14 executes a flush process oftransferring the data from the flash memory 17 to the media cache area100, without using the SMR area 110 which is relatively susceptible tovibration (impact) (block 309). The MPU 14 causes the media cache area100 to hold the data until there is no longer the detection from theshock sensor 21 or until a predetermined time has passed since there wasno longer the detection (block 306).

In addition, when the free space of the flash memory 17 is insufficient,the MPU 14 selects the media cache area 100 and stores the data in themedia cache area 100 (NO in block 307, block 305). In this case, too,the MPU 14 causes the media cache area 100 to hold the data (block 306).As a matter of course, if vibration (impact) is no longer detected, theMPU 14 executes, based on the operation state of the disk drive, theflush process of transferring the data from the media cache area 100 tothe SMR area 110 (see block 206).

On the other hand, when the vibration (impact) exceeds the stipulatedvalue (outside the permissible range), the MPU 14 executes an operationof selecting, as a data storage destination, the flash memory 17 whichis robust to vibration (impact) (YES in block 301). Specifically, whenthe flash memory 17 has a free space which can store data, the MPU 14stores the data in the flash memory 17 (YES in block 302, block 303).

The MPU 14 causes the flash memory 17 to hold the data until vibration(impact) is no longer detected or until a predetermined time has passedsince there was no longer the detection (block 304). Thereafter, basedon the operation state of the disk drive, the MPU 14 executes the flushprocess of transferring the data from the flash memory 17 to the SMRarea 110 (see block 204, block 205).

However, when the free space of the flash memory 17 is insufficient, theMPU 14 stores the data in the media cache area 100 (NO in block 302,block 305). Accordingly, the MPU 14 causes the media cache area 100 tohold the data (block 306).

According to the present embodiment, when vibration (impact) has beenapplied to the disk drive as a variation of the outside environment, therisk of data loss increases in the write operation of data on the disk1. Thus, the flash memory 17 is selected as a first priority as the datastorage destination. In this case, the data can be held in the flashmemory 17 until vibration (impact) is no longer detected or until apredetermined time has passed since there was no longer the detection.Specifically, write data can be properly stored in a data recordingarea, based on a variation of the outside environment.

In the meantime, when the free space of the flash memory 17 isinsufficient, the media cache area 100 with a relatively low trackdensity is selected as a second priority, and data is held in the mediacache area 100. Thereby, since it is possible to avoid data write in theSMR area 110 having the highest risk of data loss due to occurrence ofvibration (impact), the data can surely be stored.

Second Embodiment

FIG. 4 is a flowchart illustrating a data storage operation relating toa second embodiment. The structure of a disk drive relating to thisembodiment is the same as shown in FIG. 1, so a description thereof isomitted here.

This embodiment relates to a data storage operation in a case where atemperature variation in the ambience of the disk drive has occurred asa variation of the outside environment of the disk drive. Specifically,as illustrated in FIG. 4, the MPU 14 detects a temperature variation inaccordance with an output from the temperature sensor 20 (block 400).The MPU 14 determines whether the degree of temperature due to thetemperature variation has exceeded a stipulated value (block 401). Inthis example, the case in which the temperature is in a low-temperaturestate below the stipulated value is regarded as “outside a permissiblerange”, and the case in which the temperature is in a temperature state(approximately a normal temperature) of the stipulated value or above isregarded as “within a permissible range”. However, in the presentembodiment, it is assumed that a high-temperature state outside thepermissible range is out of the scope of application.

If the determination result is within the permissible range (i.e. astate other than the low-temperature state below the stipulated value),the MPU 14 preferentially selects the flash memory 17 (NO in block 401).Specifically, when the flash memory 17 has a free space which can storedata, the MPU 14 stores the data in the flash memory 17 (YES in block404, block 405).

In this case, the MPU 14 executes a flush process of transferring thedata from the flash memory 17 to the media cache area 100 (block 406).Thereafter, the MPU 14 executes, based on the operation state of thedisk drive, a flush process of transferring the data from the mediacache area 100 to the SMR area 110 (block 403). Incidentally, the MPU 14may execute, based on the operation state of the disk drive, a flushprocess of transferring the data from the flash memory 17 to the SMRarea 110.

In addition, when the free space of the flash memory 17 is insufficient,the MPU 14 selects the media cache area 100 and stores the data in themedia cache area 100 (NO in block 404, block 407). Thereafter, the MPU14 executes, based on the operation state of the disk drive, the flushprocess of transferring the data from the media cache area 100 to theSMR area 110 (block 403).

On the other hand, when the temperature is in the low-temperature statebelow the stipulated value (“outside the permissible range”), the MPU 14preferentially selects the media cache area 100 as a data storagedestination, and not the flash memory 17 whose write characteristicsbecome unstable in a low-temperature environment (YES in block 401).Specifically, the MPU 14 stores the data in the media cache area 100(block 402). Thereafter, the MPU 14 executes, based on the operationstate of the disk drive, the flush process of transferring the data fromthe media cache area 100 to the SMR area 110 (block 403).

Specifically, when the ambient temperature environment of the disk drivehas changed to a low-temperature state as a variation of the outsideenvironment, the write characteristics of data write in the flash memory17 become unstable, and the risk of data loss increases. Thus, accordingto the present embodiment, the media cache area 100 is preferentiallyselected as a data storage destination, and a data write process isexecuted. Accordingly, when a change has occurred to the low-temperaturestate, it is possible to avoid a data write operation in the flashmemory 17. Therefore, the data can surely be stored by a write operationon the disk 1 which is stable with respect to a temperature variation.

In the meantime, when the data is to be transferred from the media cachearea 100 to the SMR area 110, the data may be held in the media cachearea 100 until the ambient temperature environment becomes stable.

Third Embodiment

FIG. 5 is a flowchart illustrating a data storage operation of a thirdembodiment. The structure of a disk drive relating to this embodiment isthe same as shown in FIG. 1, so a description thereof is omitted here.

This embodiment relates to a data storage operation in a case where anatmospheric pressure variation of the disk drive has occurred as avariation of the outside environment of the disk drive. Specifically, asillustrated in FIG. 5, the MPU 14 detects an atmospheric pressurevariation in accordance with an output from the atmospheric pressuresensor 22 (block 500). The MPU 14 determines whether an atmosphericpressure, which has varied, exceeds a range of a stipulated value (block501). In this example, the case in which the atmospheric pressure islower than the range of the stipulated value is regarded as “outside apermissible range”, and the case in which the atmospheric pressure iswithin the range of the stipulated value or higher than this range isregarded as “within a permissible range”.

If the determination result is within the permissible range, the MPU 14preferentially selects the flash memory 17 (NO in block 501).Specifically, when the flash memory 17 has a free space which can storedata, the MPU 14 stores the data in the flash memory 17 (YES in block507, block 508).

In this case, when the atmospheric pressure is within the permissiblerange, the MPU 14 may execute a flush process of transferring the datafrom the flash memory 17 to the media cache area 100 (block 509). Itshould be noted, however, that the MPU 14 causes the media cache area100 to hold the data until the atmospheric pressure restores to thenormal state, without using the SMR area 110 whose write characteristicsbecome unstable in a relatively reduced pressure environment (block506).

In addition, when the free space of the flash memory 17 is insufficient,the MPU 14 selects the media cache area 100 and stores the data in themedia cache area 100 (NO in block 507, block 505). The MPU 14 causes themedia cache area 100 to hold the data until the atmospheric pressurerestores to the normal state (block 506).

On the other hand, also in the case where the atmospheric pressureexceeds the range of the stipulated value and is outside the permissiblerange, the MPU 14 preferentially selects the flash memory 17 as a datastorage destination (YES in block 501). Specifically, when the flashmemory 17 has a free space which can store data, the MPU 14 stores thedata in the flash memory 17 (YES in block 502, block 503).

In this case, the MPU 14 causes the flash memory 17 to hold the datauntil the atmospheric pressure restores to the normal state (block 504).At a time point when the atmospheric pressure has restored to the normalstate, the MPU 14 may execute, based on the operation state of the diskdrive, the flush process of transferring the data from the flash memory17 to the SMR area 110 (see block 204, block 205).

However, when the free space of the flash memory 17 is insufficient, theMPU 14 selects the media cache area 100, and stores the data in themedia cache area 100 (NO in block 502, block 505). The MPU 14 causes themedia cache area 100 to hold the data (block 506). At a time point whenthe atmospheric pressure has restored to the normal state, the MPU 14may execute, based on the operation state of the disk drive, the flushprocess of transferring the data from the media cache area 100 to theSMR area 110.

As has been described above, according to the present embodiment, whenthe atmospheric pressure environment of the disk drive has changed to areduced-pressure state, which is outside the permissible range, as avariation of the outside environment, the write operation on the disk 1becomes unstable. In particular, the write operation on the SMR area 110with a high track density becomes unstable. Thus, the flash memory 17 isselected as a first priority as the data storage destination, and thedata is written and held. In addition, when the free space of the flashmemory 17 is insufficient, the media cache area 100 is selected as asecond priority as the data storage destination.

Therefore, when the atmospheric pressure is outside the permissiblerange, the data can be stored in the flash memory 17 and the data writeoperation on the SMR area 110 can be avoided. In addition, with thesecond priority being placed on the media cache area 100, the data cansurely be stored in the media cache area 100.

In a modification, the MPU 14 may execute a data storage operation in acase where a humidity variation in the ambience of the disk drive hasoccurred as a variation of the outside environment of the disk drive.Specifically, the MPU 14 detects a humidity variation in accordance withan output from the humidity sensor 23. When the degree of humidity isoutside the permissible range, the flash memory 17 may preferentially beselected as the data storage destination. Needless to say, when the freespace of the flash memory 17 is insufficient, the media cache area 100may be selected as a second priority as the data storage destination,and the data may be held in the media cache area 100.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A disk storage apparatus, comprising: a diskincludes a first recording area for recording with a first trackdensity, and a second recording area for recording with a second trackdensity lower than the first track density; a nonvolatile memoryconfigured to be one of storage destinations of write data transferredfrom a host; a detector configured to detect a variation of an outsideenvironment; and a controller configured to select the nonvolatilememory or the second recording area as the one of storage destinationsof the write data, based on a content of the variation of the outsideenvironment detected by the detector, and a state of capability orincapability for storage of the nonvolatile memory.
 2. The disk storageapparatus of claim 1, wherein the controller is configured to select thenonvolatile memory or the second recording area as a first priority,based on the content of the variation of the outside environment, whenthe variation of the outside environment is outside a permissible range,and to select the second recording area as a second priority, when thenonvolatile memory is the first priority and the nonvolatile memory isincapable of storing data.
 3. The disk storage apparatus of claim 2,wherein the controller is configured to select the nonvolatile memory asthe first priority, when the variation of the outside environment, whichis detected by the detector, is within the permissible range and thenonvolatile memory is capable of storing data.
 4. The disk storageapparatus of claim 2, wherein the controller is configured to execute aprocess of transferring data, which has been recorded in the nonvolatilememory or the second recording area, to the first recording area, and tokeep the data recorded in the nonvolatile memory or the second recordingarea as such, without executing the process of transferring the data tothe first recording area, when the variation of the outside environment,which is detected by the detector, is outside the permissible range. 5.The disk storage apparatus of claim 4, wherein the controller isconfigured to execute the process of transferring the data, when thevariation of the outside environment has shifted from outside thepermissible range to within the permissible range.
 6. The disk storageapparatus of claim 1, wherein the controller is configured to select thenonvolatile memory as a first priority when the content of the variationof the outside environment is vibration or an atmospheric pressurevariation and the variation of the outside environment is outside apermissible range, and to select the second recording area as a secondpriority when the nonvolatile memory is incapable of storing data. 7.The disk storage apparatus of claim 1, wherein the controller isconfigured to select the second recording area as a first priority whenthe content of the variation of the outside environment is a temperaturevariation and the variation of the outside environment is outside apermissible range.
 8. The disk storage apparatus of claim 7, wherein thecontroller is configured to transfer data, which has been recorded inthe second recording area, to the first recording area.
 9. A method ofstoring data in a disk storage apparatus, which comprises a diskincluding a first recording area for recording with a first trackdensity, and a second recording area for recording with a second trackdensity lower than the first track density, a nonvolatile memoryconfigured to be one of storage destinations of write data transferredfrom a host, and a detector configured to detect a variation of anoutside environment, the method comprising: receiving write datatransferred from a host; and selecting the nonvolatile memory or thesecond recording area as the one of storage destinations of the writedata, based on a content of the variation of the outside environmentdetected by the detector, and a state of capability or incapability ofstorage of the nonvolatile memory.
 10. The method of claim 9, furthercomprising: selecting the nonvolatile memory or the second recordingarea as a first priority, based on the content of the variation of theoutside environment, when the variation of the outside environment isoutside a permissible range; and selecting the second recording area asa second priority, when the nonvolatile memory is the first priority andthe nonvolatile memory is incapable of storing data.
 11. The method ofclaim 10, further comprising: selecting the nonvolatile memory as thefirst priority, when the variation of the outside environment, which isdetected by the detector, is within the permissible range and thenonvolatile memory is capable of storing data.
 12. The method of claim10, further comprising: executing a process of transferring data, whichhas been recorded in the nonvolatile memory or the second recordingarea, to the first recording area; and keeping the data recorded in thenonvolatile memory or the second recording area as such, withoutexecuting the process of transferring the data to the first recordingarea, when the variation of the outside environment, which is detectedby the detector, is outside the permissible range.
 13. The method ofclaim 12, further comprising: executing the process of transferring thedata, when the variation of the outside environment has shifted fromoutside the permissible range to within the permissible range.
 14. Themethod of claim 9, further comprising: selecting the nonvolatile memoryas a first priority when the content of the variation of the outsideenvironment is vibration or an atmospheric pressure variation and thevariation of the outside environment is outside a permissible range; andselecting the second recording area as a second priority when thenonvolatile memory is incapable of storing data.
 15. The method of claim9, further comprising: selecting the second recording area as a firstpriority when the content of the variation of the outside environment isa temperature variation and the variation of the outside environment isoutside a permissible range.
 16. The method of claim 15, furthercomprising: transferring data, which has been recorded in the secondrecording area, to the first recording area.